function print_array(arr)
{
    var n = array_size(arr);
    var i;
    print("[");
    for (i = 0; i < n; i = i + 1)
    {
        print(arr[i]);
        if (i != n - 1)
        {
            print(", ");
        }
    }
    println("]");
}


function print_lines(arr)
{
    var n = array_size(arr);
    var i;
    for (i = 0; i < n; i = i + 1)
    {
        println(arr[i]);
    }
}

function push_shit(arr, val)
{
    array_push(arr, val);
}

function build_array(n)
{
    return array(n);
}

function fill_array(arr)
{
    var n = array_size(arr);
    var i;
    for (i = 0; i < n; i = i + 1)
    {
        arr[i] = n - i;
    }
}


function main(argc, argv)
{
    var a = array();
    print_array(a);
    array_push(a, 1);
    print_array(a);
    array_push(a, 2);
    print_array(a);
    array_push(a, 3);
    print_array(a);
    push_shit(a, 4);
    print_array(a);
    array_push(a, -111);
    print_array(a);
    var b = build_array(10);
    fill_array(b);
    print_array(b);
    a = read_lines("BuiltIns.js");
    print_lines(a);
    var i = parse_int("1010");
    println(i);
    i = parse_int("666x");
    println(i);
    i = parse_int("-1010");
    println(i);
    i = parse_int("-666x");
    println(i);
    var str = "abc	def	ghi	,,,	jkl";
    a = string_split(str, ",	");
    print_array(a);
    return 0;
}